package com.xingzuo.library_pay.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.xingzuo.base.ui.mvp.base.adapter.BaseAdapter;
import com.xingzuo.library_pay.bean.PayBean;

import java.util.List;

public class PayAdapter extends BaseAdapter<PayBean> {
    public PayAdapter(int layoutResId, @Nullable List<PayBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, PayBean item) {
        super.convert(helper, item);
        if (item.isSelect()){
            helper.itemView.setBackgroundResource(com.xingzuo.library_common.R.drawable.shape_21d4d1_6);
        }else {
            helper.itemView.setBackgroundResource(com.xingzuo.library_common.R.drawable.shape_f5f5f5_6);
        }
    }
}